<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>热门</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" href="../../css/main.css" />
    <script src="../../script/vue.min.js"></script>
    <script src="../../script/fastclick.js"></script>
    <style>
        #hot{
    		background: #fff;
    	}
        .wrap-nav-box{
    		padding-top: 8px;
        border-bottom: #eee solid 10px;
        padding-bottom: 10px;
    	}
    	.nav-box{
    		height: 88px;
    		text-align: center;
    	}
		.nav-img{
			width: 45px;
			height: 45px;
			position: absolute;
			left: 50%;
			margin-left: -22.5px;
		}
		.nav-text{
			width: 100%;
			position: absolute;
			bottom: 0px;
			display: block;
			font-size: 14px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
		}
		.aui-grid [class*=aui-col-]{
			padding: 9px 0;
		}
    </style>
</head>

<body>
    <div id="hot" v-cloak>
        <section class="aui-grid wrap-nav-box">
            <div class="aui-row">
                <div class="aui-col-xs-3 nav-box" v-for="(item, index) in topSearch" :key="index" @click="goOther(item)">
                    <img class="nav-img" :src="item.imgUrl" alt="">
                    <div class="nav-text">{{item.text}}</div>
                </div>
            </div>
        </section>
        <section>
            <div class="hot-title">
                <img src="../../image/hot/sdln_hotico.png">
            </div>
            <div class="list-box" v-for="(item, index) in dataList" :key="index" @click="getMoney(item)">
                <!-- 抢光了 -->
                <div class="tip-box" v-if="item.status == 2"></div>
                <div class="list-box-top">
                    <div class="list-box-top-left">
                        <img :src="item.logo">
                        <div class="list-box-top-left-text">
                            <p>{{item.name}}</p>
                            <ul>
                                <li v-for="(items, indexp) in item.feature.split('，')" :key="index">{{items}}</li>
                            </ul>
                        </div>
                    </div>
                    <div class="list-box-top-right">点我拿钱</div>
                </div>
                <div class="list-box-bottom">
                    <ul>
                        <li class="list-one">
                            <span>额度(元)</span>
                            <p>{{item.limit}}</p>
                        </li>
                        <li class="list-two">
                            <span>成功率</span>
                            <p>{{item.successRate}}%</p>
                        </li>
                        <li class="list-two">
                            <span>日费率</span>
                            <p>{{item.rate}}%</p>
                        </li>
                    </ul>
                </div>
            </div>
        </section>
    </div>
</body>
<script src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
apiready = function() {
  FastClick.attach(document.body);
    api.setRefreshHeaderInfo({
        visible: true,
        // loadingImg: '../image/timg.gif',
        bgColor: '#fafafa',
        textColor: '#323232',
        textDown: '下拉刷新...',
        textUp: '松开立即刷新...',
        showTime: true
    }, function(ret, err) {
        // setTimeout('api.refreshHeaderLoadDone()', '500');
        setTimeout(function() {
          api.refreshHeaderLoadDone()
          vm.dataList = $api.getList('JA8Izfoh');
        },300)
    });
    api.showProgress({
        title: '',
        text: '',
        modal: true
    });
    var vm = new Vue({
        el: '#hot',
        data: {
            topSearch: [
                { id: 'z687O7Vh', text: '今日新口子', imgUrl: '../../image/hot/hot1.png' },
                { id: 'SyQPAMfg', text: '2千以下', imgUrl: '../../image/hot/hot2.png' },
                { id: 'wIHlJriD', text: '2千-1万', imgUrl: '../../image/hot/hot3.png' },
                { id: 'MPnuVmoC', text: '1万以上', imgUrl: '../../image/hot/hot4.png' },
                { id: 'd2tD4jC1', text: '手机号借钱', imgUrl: '../../image/hot/hot5.png' },
                { id: 'UnwBrs0V', text: '600芝麻分借', imgUrl: '../../image/hot/hot6.png' },
                { id: 'tXPkXcSE', text: '不查征信', imgUrl: '../../image/hot/hot7.png' },
                { id: 'Mmctkjwy', text: '身份证下款', imgUrl: '../../image/hot/hot8.png' }
            ],
            dataList: [],
            title: '热门'
        },
        methods: {
            getNav: function () {
              $.ajax({
                  type: "GET",
                  url: "http://api.oouye.com/module/list",
                  dataType: 'json',
                  async:false,
                  data:{
                    did: $api.getStorage('did'),
                    version: '1.0',
                    boundleId: 'com.lin.xiaozhusudai',
                    channel: $api.getStorage('channel'),
                    limit: 100,
                    start: 0,
                  },
                  success: function(data){
                    // alert(data.data.list)
                    api.hideProgress();
                    if (data.code === 10200) {
                      // alert(data)
                    }
                    // return 2

                  }
              });
            },
            goOther: function (item) {
              var that = this
              api.setGlobalData({
                key: 'typeid',
                value: item.id
              });
              api.setGlobalData({
                key: 'typetext',
                value: item.text
              });
              api.openWin({
            			name: 'typelist',
            			url: 'typelist.html'
        			});
            },
            getMoney: function(item) {
              $api.isDownload(item, '热门')
            }
        },
        mounted: function() {
          // this.getNav()
          this.dataList = $api.getList('JA8Izfoh');
        }
    })
};


</script>

</html>
